{% extends "base.html"%}
 {% block head %}

     <style>
     /*分页*/
.pagination{
 margin-bottom: 20px;
}
.pagination .pagination-item{
  border: solid 1px #d6d6d6;
  border-radius: 0.2rem;
  color: #7d7d7d;
  text-decoration: none;
  text-transform: uppercase;
  display: inline-block;
  text-align: center;
  padding: 5px 9px;
 cursor: pointer;
}
    .href-title:hover{
        color: #099B43;
    }
     .item-title{
         font-size: 15px;
         font-weight: bolder;
         margin-bottom: 10px;
         display: inline-block;
     }
     .nlist pre{
         font-size: 14px;
         color: #4c4b4b;
     }
     </style>
    <div class="template">
  <div class="box">
    <h3>
      <p><span>苹果的博客</span></p>
    </h3>
  </div>
</div>
<article>
<h2 class="title_tj">
    <p>最新<span>推荐</span></p>
  </h2>
<div class="bloglist left">
{% for info in data %}
    {%csrf_token%}
    <div class="title">
    <ul class="nlist">
        <a class="href-title" href="/detail/{{ info.hid }}/"><p>
            <span class="item-title">{{ info.title }}</span>
        </a>
        <p>{{ info.detail|safe|slice:":200"}}...</p>
    </ul>
    <p class="dateview"><span>发布时间：{{info.edit_time}}</span><span>作者：{{ info.edit_user_name }}</span><span>标签~：[<a href="javascript:;">{{ info.category_names }}</a>]</span><span><a href="/detail/{{ info.hid }}/">评论</a></span></p>
    </div>
{% endfor %}
</div>
     <aside class="right">
    <script language="javascript">
        calendar();

    </script>
{#         </div>#}

         <div class="news">
    <h3>
      <p>随笔<span>分类</span></p>
    </h3>
    <ul class="rank">
          {% for title in cate_name %}
      <li>
          <a class="href-title" href="/cate_list/{{ title.category_id }}/" title="{{ title.category_name }}" target="_blank">{{ title.category_name }}</a>
      </li>
        {% endfor %}
    </ul>
    <h3 class="ph">
      <p>点击<span>排行</span></p>
    </h3>
    <ul class="paih">
        {% for i in count_title %}
        <li>
          <a href="/detail/{{ i.hid }}/" title="{{ i.title }}" target="_blank">{{ i.title }}</a>
      </li>
        {% endfor %}
    </ul>
    <h3 class="links">
      <p>友情<span>功能</span></p>
    </h3>
    <ul class="website">
        <form action="/post/" method="POST">
         <span><font>ip:</font></span>
          <input type="text" name="ip">
          <input type="submit" value="ip归属地">
      </form>
{#      <li><a href="/">个人博客</a></li>#}
{#      <li><a href="#">联系</a></li>#}
        <form action="/cat_title/" method="POST">
         <span><font>问题:</font></span>
          <input type="text" name="title">
          <input type="submit" value="提交">
      </form>
      <li><a href="/#">搜索 </a></li>
      <li><a href="/#">公告</a></li>
    </ul>
    </div>

</article>
<script src="../static/js/silder.js"></script>

<body>

<div class="container" style="text-align: center;">
     <div class="col-md-6 col-md-offset-3">
    {% for contact in contacts %}
{#     Each "contact" is a Contact model object.#}
    {{ contact.full_name|upper }}
{% endfor %}
<p class="pagination">

    <span class="step-links">
        {% if contacts.has_previous %}
            <a href="?page={{ contacts.previous_page_number }}">
                <span class="pagination-item"> < </span>
            </a>
        {% endif %}
        <span class="pagination-item">
            <a href="?page={{ contacts.number }}">{{ contacts.number }}</a>
        </span>
        <span>...</span>
        <span class="pagination-item">
             <a href="?page={{ contacts.paginator.num_pages }}">{{ contacts.paginator.num_pages }}</a>
        </span>

{#            <font color="#9127c0">{{ contacts.number }}</font>  .... <font color="#9127c0">{{ contacts.paginator.num_pages }}</font>#}
        </span>
        {% if contacts.has_next %}
            <a href="?page={{ contacts.next_page_number }}">
                <span class="pagination-item"> > </span>
            </a>
        {% endif %}
    </span>
</p>
</div>
</div>
</body>
{% endblock %}


{#      # 分页样式#}
{##}
{#        <div class="col-md-6 col-md-offset-3">#}
{#            <div id="Paginator" style="text-align: center">#}
{#                <ul id="pageLimit"></ul>#}
{#                <li> <a title = "Go to first page ">首页</a></li>#}
{#     </div>#}
{#            <ul class="pagination pagination-sm">#}
{#                {{ page_obj.page_html|safe }}#}
{#            </ul>#}
{#        </div>#}
{#    </div>#}
{#</body>#}
{#     <div id="Paginator" style="text-align: center">#}
{#         <ul id="pageLimit"></ul>#}
{#    </div>#}
{#{% endblock %}#}
{##}
{#{% block customerjs %}#}
{#    <script src="/static/sbadmin2/vendor/bootstrap/js/bootstrap-paginator.js"></script>#}
{#    <script src="/static/sbadmin2/dist/js/page_speed_info_log.js"></script>#}
{##}




